//
// Created by 党清浩 on 2021/9/27.
//
#include <stdio.h>

/*生日*/
struct stuBirthday {
    /*年*/
    int Year;
    /*月*/
    int Month;
    /*日*/
    int Day;
};
/*成绩*/
struct stuScore {
    /*平时成绩*/
    int usuallyResults;
    /*实验成绩*/
    int experimentalResults;
    /*期末成绩*/
    int finalResult;
    /*总评成绩*/
    int totalResult;
};

struct Members {
    /*学号*/
    int stuId;
    /*姓名*/
    char stuName[9];
    /*生日*/
    struct stuBirthday stubirthday;
    /*成绩*/
    struct stuScore stuscore;
};

int main() {
    int num, i;
    /* 输入数量 */
    scanf("%d", &num);
    struct Members members[num];

    for (i = 0; i < num; i++) {

        scanf("%d", &members[i].stuId);

        scanf("%s", members[i].stuName);
        /* 输入年月日 */
        scanf("%d %d %d",
                /* 年 */
              &members[i].stubirthday.Year,
                /* 月 */
              &members[i].stubirthday.Month,
                /* 日 */
              &members[i].stubirthday.Day
        );
        /* 输入成绩 */
        scanf("%d %d %d",
                /* 输入学生的平时成绩 */
              &members[i].stuscore.usuallyResults,
                /* 输入学生的实验成绩 */
              &members[i].stuscore.finalResult,
                /* 输入学生的期末成绩 */
              &members[i].stuscore.experimentalResults
        );
    }
    /*输出*/
    printf("%-10s%-10s%-12s%-4s%-4s%-4s%-4s\n","num","name","birthday","s1","s2","s3","sum");
    for (i = 0; i < num; i++) {
        /* 总评成绩 = 平时成绩*0.2+实验成绩*0.3+期末成绩*0.5 */
        members[i].stuscore.totalResult = (members[i].stuscore.usuallyResults * 0.2) +
                                           (members[i].stuscore.finalResult * 0.3) +
                                           (members[i].stuscore.experimentalResults * 0.5);

        /* 学号10列列宽，左对齐；
         * 姓名10列列宽，左对齐；
         * 出生日期的年份原样输出，月份为2列列宽右对齐，日为4列列宽左对齐；
         * 平时成绩、实验成绩、期末成绩和总评成绩均为4列列宽，左对齐
         * */
        printf("%-10d%-10s%-4d/%2d/%-4d%-4d%-4d%-4d%-4d",
               members[i].stuId,
               members[i].stuName,
               members[i].stubirthday.Year,
               members[i].stubirthday.Month,
               members[i].stubirthday.Day,
               members[i].stuscore.usuallyResults,
               members[i].stuscore.finalResult,
               members[i].stuscore.experimentalResults,
               members[i].stuscore.totalResult
        );
        printf("\n");
    }

    return 0;
}



